package ZuoYe3_whileXunHuan_0420;

import java.util.Scanner;

public class ZuoYe11_PingJunShu {

	public static void main(String[] args) {
		// 输入10个数,求其平均值,最大值
		Scanner input = new Scanner(System.in);
		int i = 1, sum = 0, max = 0;
		while (i <= 10) {
			System.out.println("请输入第" + i + "个整数：");
			int a = input.nextInt();
			if (i == 1) {
				max = a;
			}
			if (a > max) {
				max = a;
			}
			sum += a;
			i++;
		}
		System.out.println("十个数的最大值是：" + max);
		System.out.println("十个数的平均数是：" + sum / 10);

	}

}
